package com.tao.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.tao.to.KArticleTO;

public interface ArticleDAO extends JpaRepository<KArticleTO, Long>, JpaSpecificationExecutor<KArticleTO>{
	
	@Query("select article from KArticleTO article where article.category.categoryId=?1")
	public List<KArticleTO> getArticlesByCategory(int category);

}
